package com.xkdx.guangguang.fragment.user;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.xkdx.guangguang.module.network.AbsAction;

public class UserModifyPwdAction extends AbsAction {

	private String userID, userToken, oldPwd, newPwd;

	public UserModifyPwdAction(String userID, String userToken, String oldPwd,
			String newPwd) {
		this.userID = userID;
		this.userToken = userToken;
		this.oldPwd = oldPwd;
		this.newPwd = newPwd;
	}

	@Override
	public void constructRequest() {

		HashMap<String, String> modifyPwdmap = new HashMap<String, String>();
		modifyPwdmap.put("UserID", userID);
		modifyPwdmap.put("LoginToken", userToken);
		modifyPwdmap.put("OldPassword", oldPwd);
		modifyPwdmap.put("NewPassword", newPwd);

		String loginJson = constructJson(modifyPwdmap);
		Parameter parameter = new Parameter("userInterface",
				"editUserPassword", loginJson);
		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);

		requestData = constructMod(list);
	}

}
